package com.teradata.olingo.metadata.core.edm.mapper.impl;

import com.teradata.olingo.metadata.core.edm.annotation.EdmAction;
import com.teradata.olingo.metadata.core.edm.annotation.EdmFunction;
import com.teradata.olingo.metadata.core.edm.mapper.api.GenericStructuredType;


/**
 * Build the internal name for Intermediate Model Elements
 * 
 * @author Oliver Grande
 *
 */
final class GenericNameBuilder {
  public String buildStructuredTypeName(final Class<?> clazz) {
    return clazz.getCanonicalName();
  }


  public String buildFunctionName(final EdmFunction jpaFunction) {
    return jpaFunction.name();
  }

  public String buildActionName(final EdmAction jpaAction) {
    return jpaAction.name();
  }

  public String buildEntitySetName(final GenericEdmNameBuilder nameBuilder, final GenericStructuredType entityType) {
    return nameBuilder.buildFQN(entityType.getInternalName()).getFullQualifiedNameAsString();
  }
}
